## Make XInput_wrap.c from XInput.i ##
# This part requires SWIG. Don't uncomment unless you really need to regenerate the .c wrapper. If you do so:
# 1) Install an old SWIG version (it will not compile with SWIG Versions 1.3.10 and later, but successfully tried with versions 1.3.7 and 1.3.9)
# 2) Changes must then be made to XInput_wrapper.c: replace all occurrences of _XInput by _fr_emn_xinput_XInput and _1_1 by _1
# /usr/local/bin/swig -java -v XInput.i

## Make libXInput.so from XInput_wrap.c ##
gcc -I/usr/X11R6/include -I$JAVA_HOME/include/ -I$JAVA_HOME/include/linux -shared XInput_wrap.c -L/usr/X11R6/lib/ -lXi -o libXInput.so
ldd -d libXInput.so
mv libXInput.so ..
